/*============================================================================*/
/*                                                                            */
/*  FILE       : err_code.h                                                   */
/*  CONTENTS   : Contains error code enumerations for Motionbase API.         */
/*----------------------------------------------------------------------------*/
/*    $Archive:: /Software/mbapi/release/include/dprio/ERR_CODE.H            $*/
/*   $Revision:: 237                                                         $*/
/*----------------------------------------------------------------------------*/
/*  VISIBILITY : Public                                                       */
/*               Copyright (c) 1997 Motionbase PLC                            */
/*               All rights reserved.                                         */
/*----------------------------------------------------------------------------*/
/*  HISTORY    :                                                              */
/*                                                                            */
/*    Date     Author    Description                                          */
/*  06/03/98     KG      Created                                              */
/*  07/05/99     KG      erDATA_LATCH_NUMBER_OUT_OF_RANGE is now only used by */
/*                       getHostDataLatch.                                    */
/*============================================================================*/
#ifndef _ERR_CODE_H_
#define _ERR_CODE_H_

#ifdef __cplusplus
extern "C" {
#endif

/*============================================================================*/
/* ENUMS                                                                      */
/*============================================================================*/
typedef enum {
  erSUCCESS=0,                         /* no error                            */
  erVALUE_OUT_OF_RANGE,                /* data specified out of range         */
  erOUT_OF_MEMORY,                     /* not enough MCC heap                 */
  erCURRENT_LIMIT_OUT_OF_RANGE,        /* setCurrentLimitForHoming error      */
  erBACKOFF_SPEED_OUT_OF_RANGE,        /* setBackoffSpeed error               */
  erACCELERATION_OUT_OF_RANGE,         /* setAcceleration error               */
  erDECELERATION_OUT_OF_RANGE,         /* setDeceleration error               */
  erHOME_VELOCITY_OUT_OF_RANGE,        /* setHomeVelocity error               */
  erHOME_SWITCH_INPUT_OUT_OF_RANGE,    /* setHomeSwitchInput error            */
  erMOTION_IN_PROGRESS,                /* action denied when axis in motion   */
  erMOTION_ERROR,                      /* general motion (async) error        */
  erINVALID_CHANNEL,                   /* adc / dac channel out of range      */
  erINVALID_INPUT,                     /* digital input out of range          */
  erINVALID_OUTPUT,                    /* digital output out of range         */
  erINPUT_OUT_OF_RANGE,                /* setHomeSwitchInput error            */
  erINPUT_UNAVAILABLE,                 /* setHomeSwitchInput error            */
  erCANT_FREE_INPUT,                   /* setAvailableInputs error            */
  erDB_ERROR,                          /* daughterboard initialisation failed */
  erINVALID_ACTUATOR_INDEX,            /* actuator index out of range         */
  erPLATFORM_IDLE_TEST_FAILED,         /* getPlatformIdle error               */
  erPLATFORM_NOT_IDLE,                 /* platform in motion                  */
  erPLATFORM_IDLE,                     /* platform not in motion              */
  erBAD_KINEMATICS_TYPE,               /* kinematics type not supported       */
  erFILTER_BLOCK_NUMBER_OUT_OF_RANGE,  /* get/setFilter error                 */
  erUNSTABLE_FILTER,                   /* the specified filter is unstable    */
  erDATA_LATCH_NUMBER_OUT_OF_RANGE,    /* getHostDataLatch error              */
  erFILTER_INPUT_OUT_OF_RANGE,         /* setFilter error                     */
  erKINEMATICS_INPUT_OUT_OF_RANGE,     /* setFilter error                     */
  erCOMMAND_INTERRUPTED,               /* dpr command was not loaded          */
  erINVALID_HANDLE,                    /* handle to MCC invalid               */
  erBAD_HOST_TYPE,                     /* unknown host hardware               */
  erNOT_ENOUGH_MEM,                    /* PC memory allocation failed         */
  erCANNOT_OPEN_FILE,                  /* bad COFF file name                  */
  erINVALID_FORMAT,                    /* COFF file format wrong              */
  erTIMEOUT,                           /* MCC Loader timed out                */
  erERROR_DOWNLOADING,                 /* COFF download failed                */
  erBAD_BOOT_DEVICE,                   /* MCC boot source invalid             */
  erCARD_NOT_FOUND,                    /* unable to locate MCC                */
  erINITIALISING,                      /* MCC Loader initialising             */
  erNOT_RUNNING,                       /* MCC Loader unable to relocate       */
  erBAD_MCC_TYPE,                      /* unknown MCC type                    */
  erCOMMAND_ABORTED,                   /* user aborted front command          */
  erFRONT_ACTIVE,                      /* front resource already in use       */
  erRETURN_INVALID,                    /* return code invalid                 */
  erFRONT_DISABLED,                    /* PC-Front has been disabled          */
  erCODE_ERROR,                        /* PC-Front call coded incorrectly     */
  erLAST_ERROR                         /* For range checking                  */
} TErrorCode;

#ifdef __cplusplus
} /* extern "C" */
#endif

#endif /* _ERR_CODE_H_ */
/*============================================================================*/
/* END OF FILE                                                                */
/*============================================================================*/
